<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
								
<div class="widget-body">
	<div class="widget-main">
		<div id="fuelux-wizard" class="row-fluid" data-target="#step-container">
			<ul class="wizard-steps">
				<li data-target="#step1" class="active">
					<span class="step">1</span>
					<span class="title">基本信息</span>
				</li>

				<li data-target="#step2">
					<span class="step">2</span>
					<span class="title">档位</span>
				</li>

				<li data-target="#step3">
					<span class="step">3</span>
					<span class="title">确认提交</span>
				</li>
			</ul>
		</div><!-- end fuelux-wizard -->
		<div class="step-content row-fluid position-relative" id="step-container">
		<form class="form-horizontal" id="csc_product_edit_form" enctype="multipart/form-data" method="post">
			<input type="hidden" name="productVO.productModel.id" value="<s:property value="productVO.productModel.id" />" />
			<input type="hidden" name="productVO.productModel.adminModel.id" value="<s:property value="productVO.productModel.adminModel.id" />" />
			<input type="hidden" name="productVO.productModel.mproductType" value="<s:property value='productVO.productModel.mproductType' />" />
			<input type="hidden" name="productVO.productModel.childrenPrice" id="product_childrenPrice" value="0" />
			<input type="hidden" name="productVO.productModel.hoursePrice" id="product_hoursePrice" value="0" />
			<input type="hidden" name="productVO.productModel.startAddress" id="product_startAddress" value="全国" />
			<input type="hidden" name="productVO.productModel.destination" id="product_destination" value="全国" />
			<input type="hidden" id="product_isTop" name="productVO.productModel.isTop" value="false" />
			
			<div class="step-pane active" id="step1">
				<h3 class="lighter block green">Enter the following information</h3>
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_type"><span style="color: red;">*</span>商品分类：</label>

					<div class="col-xs-12 col-sm-9">
						<select id="product_category" class="select2" name="productVO.productModel.productCategoryModel.id"  data-placeholder="Click to Choose...">
							<option value="">&nbsp;</option>
							<s:if test="productCategoryVOList != null && productCategoryVOList.size() > 0">
								<s:iterator value="productCategoryVOList" var="productCategoryVO" status="countIdx">
									<option value="<s:property value="#productCategoryVO.productCategoryModel.id" />"><s:property value="#productCategoryVO.productCategoryModel.name" /></option>
								</s:iterator>
							</s:if>
						</select>
						<span class="tip_info">请选择商品分类.如果列表中没有你所需的分类,请联系风客管理员哦 </span>
					</div>
				</div>
				<div class="space-2"></div>
				
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_fullName"><span style="color: red;">*</span>主题：</label>

					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" name="productVO.productModel.fullName" id="product_fullName" class="col-xs-12 col-sm-6" />
						</div>
					</div>
				</div>
				<div class="space-2"></div>
				
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_price"><span style="color: red;">*</span>成人价格：</label>

					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" name="productVO.productModel.price" id="product_price" class="col-xs-12 col-sm-6" />
						</div>
					</div>
				</div>
				<div class="space-2"></div>
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_phone"><span style="color: red;">*</span>联系电话：</label>

					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" name="productVO.productModel.phone" id="product_phone" class="col-xs-12 col-sm-6" />
						</div>
					</div>
				</div>
				
				<div class="space-2"></div>
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_image"><s:if test='"create".equals(#request.actionType)'><span style="color: red;">*</span></s:if>展示图片：</label>

					<div class="col-xs-12 col-sm-9">
						<div class="clearfix" style="width: 50%;">
							<input type="file" name="productVO.headImage.file" id="product_image" />
							<span class="tip_info">此图为产品在首页展示的图片,建议规格800*600，不能超过2M哦</span>
						</div>
					</div>
				</div>
				<div class="space-2"></div>
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_serviceProvider"><span style="color: red;">*</span>服务提供商：</label>

					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" name="productVO.productModel.serviceProvider" id="product_serviceProvider" class="col-xs-12 col-sm-6" />
							<span class="tip_info">请填写您的公司简称(或个人品牌简称)哦</span>
						</div>
					</div>
				</div>
				<div class="space-2"></div>
				
				<s:if test="#session.AgentProfile.adminModel.canSetMarketable">
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_setting">设置：</label>

					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<label>
								<input type="hidden" id="product_isMarketable" name="productVO.productModel.isMarketable" value="" />
								<input id="product_isMarketable_box" class="ace ace-switch ace-switch-5" type="checkbox" />
								<span class="lbl">是否上架</span>
							</label>
						</div>
					</div>
				</div>
				<div class="space-2"></div>
				</s:if>
				<s:else>
					<input type="hidden" id="product_isMarketable" name="productVO.productModel.isMarketable" value="false" />
				</s:else>
				<div id="startingDate_group" class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_startingDate"><span style="color: red;">*</span>出发时间：</label>
					<div id="startingDate_div" class="input-group col-sm-9">
						<div style="margin-bottom: 5px;"><button onclick="addStartingDate();" type="button" class="btn btn-sm btn-primary">点击添加出发时间</button></div>
						<input name="productVO.productModel.startingDate" id="product_startingDate" type="hidden" value=''/>
						<div id="startingDate_example" style="display: none;">
						<div class="input-group" style="width: 50%; margin-bottom: 5px;">
							<input class="form-control date-picker" name="startingDate" id="startingDate_LY" type="text" data-date-format="yyyy-mm-dd" />
							<span class="input-group-addon">
								<i class="icon-calendar bigger-110"></i>
							</span>
							<a class="date-remove" onclick="removeStartingDate(this);"><i class="icon-remove">  </i></a>
						</div>
						</div>
					</div>
				</div>
				<div class="space-2"></div>
				<div id="productImages_group" class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_imaging"><s:if test='"create".equals(#request.actionType)'><span style="color: red;">*</span></s:if>轮播图片：</label>
					<div class="col-xs-12 col-sm-9">
						<div id="productImages_div" class="clearfix" style="width: 50%;">
							<div style="margin-bottom: 5px;"><button onclick="addProductImages();" type="button" class="btn btn-sm btn-primary">点击添加轮播图片</button></div>
						</div>
					</div>
				</div>
				<div class="space-2"></div>
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_productFeatures">风客有话说：</label>

					<div class="col-xs-12 col-sm-9">
						<textarea name="productVO.productModel.productFeatures" id="product_productFeatures" style="display: none;" rows="1" cols="1"></textarea>
						<div class="clearfix">
						</div>
						<div class="clearfix" style="border: 1px solid #d5d5d5;">
							<div id="product_productFeatures_div" class="wysiwyg-editor"></div>
						</div>
					</div>
				</div>
				
				<div class="space-2"></div>
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_introduction">对战双方：</label>

					<div class="col-xs-12 col-sm-9">
						<textarea name="productVO.productModel.introduction" id="product_introduction" style="display: none;" rows="1" cols="1"></textarea>
						<div class="clearfix">
						</div>
						<div class="clearfix" style="border: 1px solid #d5d5d5;">
							<div id="product_introduction_div" class="wysiwyg-editor"></div>
						</div>
					</div>
				</div>
				
				<div class="space-2"></div>
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_introduction1">参与方式：</label>

					<div class="col-xs-12 col-sm-9">
						<textarea name="productVO.productModel.introduction1" id="product_introduction1" style="display: none;" rows="1" cols="1"></textarea>
						<div class="clearfix">
						</div>
						<div class="clearfix" style="border: 1px solid #d5d5d5;">
							<div id="product_introduction1_div" class="wysiwyg-editor"></div>
						</div>
					</div>
				</div>
				
				<div class="space-2"></div>
				
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_feeInclude">支付方式：</label>

					<div class="col-xs-12 col-sm-9">
						<textarea name="productVO.productModel.feeInclude" id="product_feeInclude" style="display: none;" rows="1" cols="1"></textarea>
						<div class="clearfix" style="border: 1px solid #d5d5d5;">
							<div id="product_feeInclude_div" class="wysiwyg-editor"></div>
						</div>
					</div>
				</div>
				
				<div class="space-2"></div>
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="product_feeInclude1">领票方式：</label>

					<div class="col-xs-12 col-sm-9">
						<textarea name="productVO.productModel.feeInclude1" id="product_feeInclude1" style="display: none;" rows="1" cols="1"></textarea>
						<div class="clearfix">
						</div>
						<div class="clearfix" style="border: 1px solid #d5d5d5;">
							<div id="product_feeInclude1_div" class="wysiwyg-editor"></div>
						</div>
					</div>
				</div>
				
			</div><!-- end step1 -->
			
			<div class="step-pane" id="step2">
				<div class="row">
					<div class="col-xs-12">
						<div style="margin-bottom: 10px">
							<button onclick="addPriceItems();" type="button" class="btn btn-primary"><i class="icon-beaker align-top bigger-125"></i>点击添加行程</button>
						</div>
					</div>
				</div>
				<div class="row" id="priceItems_div">
				</div>
				<div id="priceItems_example" style="display: none;">
					<div id="accordion_priceItems_LY" class="accordion-style1 panel-group">
						<div class="panel panel-default">
							<div class="panel-heading">
								<h4 class="panel-title">
									<input type="hidden" name="productVO.priceItemModels[LY].id" id="priceItem_LY_id" />
									<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion_priceItems_LY" href="#collapseOne_priceItems_LY" style="width: 90%;display: inline-block;">
										<i class="icon-angle-down bigger-110" data-icon-hide="icon-angle-down" data-icon-show="icon-angle-right"></i>
										&nbsp;PriceItem <span class="price_item_title"></span>
									</a>
									<a onclick="deletePriceItem('LY')" style="float: right;width: 10%;text-align:center" class="accordion-toggle collapsed">Delete</a>
								</h4>
							</div>

							<div class="panel-collapse collapse in" id="collapseOne_priceItems_LY">
								<div class="panel-body">
									<div class="form-group">
										<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="priceItem_LY_name"><span style="color: red;">*</span>档位名称：</label>

										<div class="col-xs-12 col-sm-9">
											<div class="clearfix">
												<input type="text" name="productVO.priceItemModels[LY].name" id="priceItem_LY_name" class="col-xs-12 col-sm-6" />
											</div>
										</div>
									</div>
									<div class="space-2"></div>
									<div class="form-group">
										<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="priceItem_LY_price"><span style="color: red;">*</span>价格：</label>

										<div class="col-xs-12 col-sm-9">
											<div class="clearfix">
												<input type="text" name="productVO.priceItemModels[LY].price" id="priceItem_LY_price" class="col-xs-12 col-sm-6" />
											</div>
										</div>
									</div>
									<div class="space-2"></div>
									<div class="form-group">
										<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="priceItem_LY_isAvailable"><span style="color: red;">*</span>是否可用：</label>

										<div class="col-xs-12 col-sm-9">
											<div class="clearfix">
												<input type="hidden" id="priceItem_LY_isAvailable" name="productVO.priceItemModels[LY].isAvailable" value="true" />
												<input id="priceItem_LY_isAvailable_box" class="ace ace-switch ace-switch-5" type="checkbox" />
												<span class="lbl">&nbsp;</span>
											</div>
										</div>
									</div>
									<div class="space-2" style="display: none;"></div>
									<div class="form-group" style="display: none;">
										<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="priceItem_LY_availableStartDate"><span style="color: red;">*</span>生效时间：</label>
										<div class="input-group col-sm-9">
											<div class="input-group" style="width: 50%; margin-bottom: 5px;">
												<input class="form-control date-picker" name="productVO.priceItemModels[LY].availableStartDate" id="priceItem_LY_availableStartDate" type="text" data-date-format="yyyy-mm-dd" />
												<span class="input-group-addon">
													<i class="icon-calendar bigger-110"></i>
												</span>
											</div>
										</div>
									</div>
									<div class="space-2" style="display: none;"></div>
									<div class="form-group" style="display: none;">
										<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="priceItem_LY_availableEndDate"><span style="color: red;">*</span>失效时间：</label>
										<div class="input-group col-sm-9">
											<div class="input-group" style="width: 50%; margin-bottom: 5px;">
												<input class="form-control date-picker" name="productVO.priceItemModels[LY].availableEndDate" id="priceItem_LY_availableEndDate" type="text" data-date-format="yyyy-mm-dd" />
												<span class="input-group-addon">
													<i class="icon-calendar bigger-110"></i>
												</span>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div><!-- end accordion_priceItems_LY -->
				</div><!-- end priceItems_example -->
			</div><!-- end step2 -->
			
			<div class="step-pane" id="step3">
				<div class="center">
					<h3 class="green">Congrats!</h3>
					Your acitivities is ready to ship! Click finish to continue!
				</div>
			</div>
		</form><!-- end edit form -->
		</div><!--  end step-content -->
		
		<hr />
		<div class="row-fluid wizard-actions">
			<button type="button" class="btn btn-prev">
				<i class="icon-arrow-left"></i>
				上一步
			</button>

			<button type="button" class="btn btn-success btn-next" data-last="输入完成，确认提交 ">
				下一步
				<i class="icon-arrow-right icon-on-right"></i>
			</button>
		</div>
	</div><!-- end class="widget-main" -->
</div><!-- widget-body -->
<s:if test='"update".equals(#request.actionType)'>
<div style="display: none;">
	<div id="update_product_productFeatures_div"><s:property value="productVO.productModel.productFeatures" escapeHtml="false" /></div>
	<div id="update_product_introduction_div"><s:property value="productVO.productModel.introduction" escapeHtml="false" /></div>
	<div id="update_product_introduction1_div"><s:property value="productVO.productModel.introduction1" escapeHtml="false" /></div>
	<div id="update_product_feeInclude_div"><s:property value="productVO.productModel.feeInclude" escapeHtml="false" /></div>
	<div id="update_product_feeInclude1_div"><s:property value="productVO.productModel.feeInclude1" escapeHtml="false" /></div>
</div>
</s:if>
